# This file is part of The Vu Toolkit.
#
# The Vu Toolkit is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
#
# The Vu Toolkit is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with The Vu Toolkit; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
#
# Copyright © Zak Fenton 2008
#

module Vu
	# A horizontal or vertical list (use HList or VList)
	class AbstractList < Gadget
		@children = []
		@border_width = 4
		@border_height = 4
		
		@equal_sizing = false
		# Whether the child elements are spaced evenly
		attr_reader :equal_sizing
		
		# Equal spacing?
		def equal_sizing= (v)
			if v != @equal_sizing
				@equal_sizing = v
				request_render_all
			end
		end
		
		def children
			@children
		end
		
		def resize_has_occured
			perform_layout!
		end
		
		def perform_layout!
		end
	end
	
	class HList < AbstractList
	end
	
	class VList < AbstractList
	end
end

